import java.util.Scanner;

public class BaseMath {
    public static void easyUses(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println(Math.pow(sc.nextDouble(), sc.nextDouble()));
        sc.close();
    }

    public static void pOrE(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println(Math.pow(Math.E, Math.PI) > Math.pow(Math.PI, Math.E) ? ">" :
                Math.pow(Math.E, Math.PI) < Math.pow(Math.PI, Math.E) ? "<": "=");
        sc.close();
    }

    public static void degreesToRadians(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println(Math.toRadians(sc.nextInt()));
        sc.close();
    }

    public static void outputSumCosNSin(String[] args) {
        Scanner sc = new Scanner(System.in);
        double a = Math.toRadians(sc.nextInt());
        System.out.println(Math.cos(a)+Math.sin(a));
        sc.close();
    }

    public static void countSignsAfterComma(String[] args) {
        Scanner sc = new Scanner(System.in);
        double n = Math.pow(10, sc.nextInt());
        System.out.println(n!=1.0 ? Math.round(Math.PI * n) / n + "" : ((int) Math.round(Math.PI)));
        sc.close();

    }

    public static void rootOfNumberToPower(String[] args) {
        Scanner sc = new Scanner(System.in);
        double x = sc.nextDouble(),y = sc.nextDouble(), n = sc.nextDouble();
        sc.close();
        System.out.print(Double.valueOf(String.format("%.5f", Math.pow(Math.pow(x, y), 1.0/n))));
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        double x = scanner.nextDouble(), y = scanner.nextDouble();
        scanner.close();
        System.out.println(Math.rint(Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)) + x + y));
    }

}
